<?php
$this->breadcrumbs = array(
    'Categorization' => array('index', 'module' => $module, 'type' => $model->v_id),
    'Bulk Create'
);

$this->menu = array(
);
?>

<h1>Bulk Add New Categories</h1>

<style type="text/css">
    .form .form .note, .form .form .buttons {
        display: none;
    }
</style>
<div class="form wide">

    <?php $form = $this->beginWidget('CActiveForm', array(
    'id' => 'term-form',
    'enableAjaxValidation' => false,
)); ?>

    <?php echo $form->errorSummary($model); ?>

    <?php echo $form->hiddenField($model, 'v_id'); ?>

    <div class="row">
        <?php echo $form->labelEx($model, 'parentId'); ?>
        <?php
        $model->children;
        $this->widget('ListTaxonomy', array(
            'model' => $model,
            'attribute' => 'parentId',
            'taxonomy' => $v,
            'module' => $module,
            'exclude' => $model->id ? array($model->id) : array(),
            'htmlOptions' => array('prompt' => 'Root'),
            'selected' => $model->parentId,
        ));?>
        <?php echo $form->error($model, 'parentId'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'names'); ?>
        <?php $this->widget('HintTextField', array('model' => $model, 'attribute' => 'names', 'hint' => 'Enter each category per line', 'htmlOptions' => array('type' => 'textarea', 'style' => 'max-width: 350px; max-height: 150px; min-width: 350px; min-height: 150px;'))); ?>
        <?php echo $form->error($model, 'names'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton('Create'); ?>
    </div>

    <?php $this->endWidget(); ?>

</div>
